import React, {Component} from 'react';
import cs from 'classnames'
import BaseCmpt from '../BaseCmpt';
import './index.css';

class MSearch extends Component {

    static defaultProps = {
        data: {
            type: 7,
            style: {},
            dataset: {}
        }
    };

    constructor(props) {
        super(props);
    }

    render() {
        var {onSelected, selected, data} = this.props;
        var {style, dataset} = data;

        return (
            <div
                onClick={(e) => {
                    onSelected && onSelected(e)
                }}
                className={cs({'mSearch cmptEle': true, 'cmptEle_selected': selected})}
                style={style}
            >
                <div className="searchWrap">
                    <span className="search__icon"></span>
                    <input type="text" className="search__input"/>
                    <span className="search__clear"></span>
                </div>
            </div>
        );
    }
}

export default MSearch;
